package com.dubbo.springboot.snail;

import org.apache.dubbo.config.annotation.Reference;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

/**
 * @author xueguoping
 * @description: TODO
 * @date 2021/4/28 22:10
 */
@SpringBootApplication
public class SpringbootConsumerApplication {

    @Reference(url = "dubbo://192.168.0.128:20880/com.dubbo.springboot.snail.IUserService")
    private IUserService userService;
    public static void main(String[] args) {
        SpringApplication.run(SpringbootConsumerApplication.class,args);
    }

    @Bean
    public ApplicationRunner runner(){
        return args -> System.out.println(userService.sayHello("zhangsan"));
    }
}
